package com.clx.rmp.common.utils;

import lombok.extern.slf4j.Slf4j;

import java.io.File;

@Slf4j
public class LoadLibUtil {
    public static void load() {
        String sufix = null;
        String algo = "des";
        String osName = System.getProperty("os.name");
        if (osName.toLowerCase().indexOf("windows") > -1) {
            sufix = "lib.a";
        } else {
            sufix = "lib.so";
        }

        String libFilePath = algo + File.separator + algo + sufix;
        log.info("正在加载lib={}", libFilePath);
        System.loadLibrary(libFilePath);
    }
}
